package app.sceledroid.network;

import org.apache.http.client.HttpClient;

import android.app.ProgressDialog;
import android.content.Context;
import android.os.AsyncTask;
import android.util.Log;
import app.sceledroid.entity.User;

public class TestAsyncTask extends AsyncTask<String, Integer, Boolean> {

	private Context context;
	private ProgressDialog dialog;
	
	
	
	public TestAsyncTask(Context context) {
		super();
		this.context = context;
		this.dialog = new ProgressDialog(context);
	}

	@Override
	protected Boolean doInBackground(String... arg0) {
		// TODO Auto-generated method stub
		//while(true)
		//{
			Log.v("Test Async", "TEST!");
			
		//}
			
		return new Boolean(true);
	}

	@Override
	protected void onPostExecute(Boolean result) {
		// TODO Auto-generated method stub
		dialog.dismiss();
		super.onPostExecute(result);
	}

	@Override
	protected void onPreExecute() {
		// TODO Auto-generated method stub
		super.onPreExecute();
		dialog.setMessage("Fetching Deadline...");
		dialog.show();
	}

	@Override
	protected void onProgressUpdate(Integer... values) {
		// TODO Auto-generated method stub
		super.onProgressUpdate(values);
		dialog.setProgress(values[0]);
		
	}
	

}
